# -*- coding: utf-8 -*-
# @Time: 2021/11/8 21:28
# @Author: jiuwu
# @Email: 2359196586@qq.com
# @File: celery_main.py
# @Software: PyCharm

from celery import Celery

import os

# 路径不需要带后缀 /改成.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'promote.settings')

# 创建celery应用  起名字
app = Celery('promote')

# 导入celery配置  填celery_config的路径
app.config_from_object('celery_tasks.celery_config')

# 导入任务
app.autodiscover_tasks(['celery_tasks.email', ])
